package guoanmaker.provider.business.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import java.util.Collection;
import java.util.Date;


import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonManagedReference;


import guoanmaker.provider.helper.common.abstractobj.IdEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="t_provide_business")
public class ProviderBusiness extends IdEntity {
	private String businessName;//商户名称
	private Integer IdentityType;//身份类型 (企业服务商)
	private String companyLogo;//公司logo
	private String LicensPhone;
	private String companyIntroduce;//公司介绍
	private String companyName;
	private String companyResgiserMark;//营业执照注册号
	private String companyLicenseReplica;//营业执照副本扫描件
	private String companyOtherReplica;//手持身份证正面照片
	private String companyCorporationName;//企业联系人真实姓名
	private Integer voucherType;//证件类型  
	private String voucherEffectiveType;//证件有效期类型  1定时，0长期
	private Date voucherEffectiveDate;//证件有效日期
	private String companyCorporationIDCardNo;//法人身份证号
	private String companyCorporationIDCardNoFront;//身份证照片正面
	private String companyCorporationIDCardNoContrary;//身份证反面
	private String companyAdress;
	private String companyProvince;
	private String companyCity;
	private String companyArea;
	private String busAgelimit;//营业年限类型
	private Date busAgelimitDate;//营业年限日期
	private String orgCodeCard;//组织机构代码证
	private String orgCodeCardPicture;//组织机构代码证图片
	private String commoditys;//服务项列表
	private String new_commoditys;//修改服务项列表
	private Date   createDate;
	private String busNumber;//服务商编号
	private Integer service_range;//服务范围状态 1---待审核  2---审核成功  3----审核失败
	private String serviceAreas;;//服务地区 我在商户表加了一个服务地区
	
	private Integer isRoomServer; //是否提供空间服务 1:提供 2:不提供
	@OneToOne 
	private PersonalUser personalUser;
	
	
	@OneToMany(mappedBy="providerBusiness",fetch=FetchType.LAZY,cascade={CascadeType.ALL})
	@JsonManagedReference
	private List<ProvideCommodity> ProvideCommodity;
	
	 @Transient
	 private List<OperatorServerClass> serverClasss;
}
